<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>后台管理</title>		
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css"/>
  <link rel="stylesheet" type="text/css" href="/static/admin/admin.css"/>	
  <link rel="stylesheet" type="text/css" href="/static/plugins/webuploader/webuploader.css"/>
  <link rel="stylesheet" type="text/css" href="/static/iconfont/iconfont.css"/>	
  <link rel="stylesheet" type="text/css" href="/static/common/common.css"/>	
  <style type="text/css">	
  	.layui-logo{
 		height: 90px!important;
    	max-width: 200px!important;	
  	}
  	.layui-logo img{
  		margin-top: 5px;
 		max-width: 120px;
    	max-height: 70px;
  	}
  	.layui-side-menu .layui-nav{
		margin-top: 90px;		
  	}
  </style>		
</head>	
<body class="layui-layout-body">

  <div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
          <li class="layui-nav-item layadmin-flexible" lay-unselect>
            <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
              <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
            </a>
          </li>
          <!-- <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="http://www.layui.com/admin/" target="_blank" title="前台">
              <i class="layui-icon layui-icon-website"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;" layadmin-event="refresh" title="刷新">
              <i class="layui-icon layui-icon-refresh-3"></i>
            </a>
          </li> -->
        </ul>	
        <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right" style="margin: 0px 40px;">
          <!-- <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:void(0)" layadmin-event="theme">
              <i class="layui-icon layui-icon-theme">主题</i>
            </a>
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="note">
              <i class="layui-icon layui-icon-note"></i>
            </a>
          </li>	 -->
           <!-- <li class="layui-nav-item pu" lay-unselect>	
            <a href="javascript:;" style="padding: 0 40px;">	
              <cite style="font-weight: bolder;" th:each="item:${fjbLoginUserInfo.userRoleList}" th:if="${item.isCurrentRole==true}" th:text="${item.roleName}+' - 切换角色 '"></cite>
            </a>
            <dl class="layui-nav-child">
            	userRoleList
             	<dd th:each="item:${fjbLoginUserInfo.userRoleList}" th:if="${item.isCurrentRole==false}">
             		<a class="replace-role-btn" th:text="${item.roleName}" th:role-id="${item.roleId}"></a>
             	</dd> 
            </dl>
          </li> -->
          
          <!-- 如果有新消息，则显示小圆点 -->
          <li class="layui-nav-item" lay-unselect>
            <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
              <i class="layui-icon layui-icon-notice">系统消息</i>
              <span class="layui-badge-dot"></span>
            </a>
          </li>
          
          <li class="layui-nav-item pu" lay-unselect>	
            <a href="javascript:;" style="padding: 0 40px;">	
             	<cite th:text="${fjbLoginUserInfo.sysUser.nickname}"></cite>
            </a>
            <dl class="layui-nav-child">
             	<dd><a lay-href="set/user/info.html">基本资料</a></dd> 
              	<dd><a lay-href="set/user/password.html">修改密码</a></dd> 
              <hr>	
              <dd layadmin-event="logout" style="text-align: center;"><a href="/login/out">退出</a></dd>
            </dl>	
          </li>

          <!-- <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li> -->
          <!-- <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
            <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li> -->
        </ul>
      </div>

      <!-- 侧边菜单 -->
      <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll"> 
          <div class="layui-logo" lay-href="/sysUser/showUserDetails" lay-text="个人信息">	
            <img id="userPictureUrl" alt="" src="">		
            	<!-- <span th:text="${fjbLoginUserInfo.sysUser.nickname}"></span> -->
          </div>		
		  
		  <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
            <li data-name="home" class="layui-nav-item">
              <a href="javascript:;" lay-tips="商品管理" lay-direction="2">
                <i class="layui-icon layui-icon-home"></i>
                <cite>商品管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="console">
                  <a lay-href="/bannerInfo/showPageList">广告列表</a>
                </dd>
              </dl>	
              <dl class="layui-nav-child">
                <dd data-name="console">
                  <a lay-href="/brandInfo/showPageList">品牌列表</a>
                </dd>
              </dl>	
              <dl class="layui-nav-child">
                <dd data-name="console">		
                  <a lay-href="/productCategory/showPageList">车型列表</a>
                </dd>
              </dl>
              <dl class="layui-nav-child">
                <dd data-name="console">		
                  <a lay-href="/productInfo/showPageList">商品列表</a>
                </dd>
              </dl>
            </li>
            
            <li data-name="home" class="layui-nav-item">
              <a href="javascript:;" lay-tips="用户管理" lay-direction="2">
                <i class="layui-icon layui-icon-home"></i>
                <cite>用户管理</cite>
              </a>	
              <dl class="layui-nav-child">
                <dd data-name="console">
                  <a lay-href="sysUser/showPageList">用户列表</a>
                </dd>
              </dl>
               <dl class="layui-nav-child">
                <dd data-name="console">
                  <a lay-href="sysUserFile/showPageList">文件列表</a>
                </dd>
              </dl>
            </li>
            
            <li data-name="home" class="layui-nav-item">
              <a href="javascript:;" lay-tips="插件管理" lay-direction="2">
                <i class="layui-icon layui-icon-home"></i>
                <cite>插件管理</cite>
              </a>	
              <!-- <dl class="layui-nav-child">
                <dd data-name="console">
                  <a lay-href="pluginsZk/showZkIndex">zk数据化</a>
                </dd>
              </dl> -->
              <dl class="layui-nav-child">
                <dd data-name="console">
                  <a lay-href="sysUserFile/showPageList">文件列表</a>
                </dd>
              </dl>
            </li>
		  </ul>
		  
          <!-- 权限菜单列表  -->
		  <!-- <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
		  	<li th:each="item:${fjbLoginUserInfo.validMenuList}" data-name="get" class="layui-nav-item">
		      <a href="javascript:;" th:lay-href="${item.url}"  th:lay-tips="${item.name}" lay-direction="2">
				<i th:class="${item.icon}"></i>	
				<cite th:text="${item.name}"></cite>	
		      </a>	
		      
		      <dl th:each="childItem:${item.childList}" class="layui-nav-child" >
              	<dd data-name="button">	
                  <a th:lay-href="${childItem.url}" th:text="${childItem.name}"></a>
                </dd>	
              </dl>
		    </li>
		  </ul> -->
		    
        </div>
      </div>

      <!-- 页面标签 -->
      <div class="layadmin-pagetabs" id="LAY_app_tabs">
        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
        <!-- <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div> -->
        <div class="layui-icon layadmin-tabs-control layui-icon-down">
          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
            <li class="layui-nav-item" lay-unselect>
              <a href="javascript:;"></a>
              <dl class="layui-nav-child layui-anim-fadein">
                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
              </dl>
            </li>
          </ul>
        </div>
        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
          <ul class="layui-tab-title" id="LAY_app_tabsheader">
            <li lay-id="console.html" class="layui-this">
            	<i class="layui-icon layui-icon-home"></i>
            </li>
          </ul>
        </div>
      </div>


      <!-- 主体内容 -->
      <div class="layui-body" id="LAY_app_body">  
        <div class="layadmin-tabsbody-item layui-show">
          <iframe src="/console" frameborder="0" class="layadmin-iframe"></iframe>
        </div>
      </div>

      <!-- 辅助元素，一般用于移动设备下遮罩 -->
      <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
  </div>
  <script src="/static/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
  <script src="/static/layui/layui.js"></script>
  <script src="/static/admin/index.js"></script> 
  <script th:inline="javascript">	
  	 $(document).ready(function() {	
  		var fjbLoginUserInfo = [[${fjbLoginUserInfo}]];	 
  		var validRolelist = [[${validRolelist}]];	 
  		var validMenuList = [[${validMenuList}]];	 
  		console.log(fjbLoginUserInfo);
  		console.log(validRolelist);
  		console.log(validMenuList);
  		var pictureUrlVal = "https://dss0.bdstatic.com/-0U0bnSm1A5BphGlnYG/tam-ogel/3a381727f13291850f8e2bfbafb1236a_121_121.jpg";		
		if(pictureUrlVal){		
			$(".layui-logo img").attr("src",pictureUrlVal);	
		}else{
			$(".layui-logo img").attr("src","");	
		} 
	 })
	  
	 // 切换角色 	 replace-role-btn
	 $(document).on('click', '.replace-role-btn', function () {
		 // var roleId = $(this).attr("role-id");
		 // window.location.href='/login/replaceRole?roleId='+roleId;
	 })
	 
	 //点击导航栏重新加载页面	
	 $(document).on('click', '.layui-tab-title .layui-this', function () {
	    var selectMenu = $('.layui-tab-title .layui-this').attr('lay-id');
	    $("iframe[src='"+selectMenu+"']").attr('src', $('.layui-show .layadmin-iframe').attr('src'))
	 });
			  
  </script>   
</body>
</html>
